<?php
$step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0;

function display_header() {
	header( 'Content-Type: text/html; charset=utf-8' );
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Focus Setup</title>
<link href="http://fonts.googleapis.com/css?family=PT+Sans|Changa+One" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="install.css" type="text/css" />

</head>
<body>
<div class="content">
<div class="content-section">
	<h1><div id="logo">focus</div></h1>
	<br/>
	<br/>
<?php
}//end function display_header();

switch($step) {
	case 0:
		display_header();
?>

<p>Serveri seadistamiseks on vajalik URL'i aadress ja andmebaasi kohta j&#228;rgnev info:</p>
<ol>
	<li>Keskkonna aadress (URL)</li>
	<li>Kasutajanimi</li>
	<li>Andmebaasi nimi</li>
	<li>Andmebaasi parool</li>
	<li>Andmebaasi host</li>
</ol>

<p class="step"><a href="index.php?step=1" class="button">Alusta!</a></p>
<?php
	break;

	case 1:
		display_header();
	?>

<form method="post" action="install.php">
<p>Palume t&#228;ita allolevad lahtrid serveri seadistamiseks.</p>
	<table class="form-table">
		<tr>
			<th scope="row"><label for="base_url">URL'i aadress: </label></th>
			<td><input name="base_url" id="base_url" type="text" size="25" value="http://www.example.com" /></td>
			<td>URLi aadress, kus keskkond t&#246;&#246;le hakkab.</td>
		</tr>
		<tr>
			<th scope="row"><label for="database">Andmebaasi nimi: </label></th>
			<td><input name="database" id="database" type="text" size="25" value="focus" /></td>
			<td>Andmebaasi nimi, mida soovite Focuses jooksutada.</td>
		</tr>
		<tr>
			<th scope="row"><label for="username">Kasutajanimi: </label></th>
			<td><input name="username" id="username" type="text" size="25" value="kasutajanimi" /></td>
			<td>MySQL kasutajanimi</td>
		</tr>
		<tr>
			<th scope="row"><label for="password">Parool: </label></th>
			<td><input name="password" id="password" type="password" size="25" value="parool" /></td>
			<td>MySQL parool</td>
		</tr>
		<tr>
			<th scope="row"><label for="localhost">Andmebaasi host: </label></th>
			<td><input name="localhost" id="localhost" type="text" size="25" value="localhost" /></td>
			<td>Kui localhost ei t&#246;&#246;ta, p&#246;&#246;rduge oma majutaja poole.</td>
		</tr>
	</table>

	<p class="step"><input name="submit" type="submit" value="Valmis" class="button" /></p>
</form>
</div>
</div>
<?php
	break;
}
?>
</body>
</html>